package com.raos.validation.model;

import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.Size;

/**
 * 用户 实体类
 *
 * @author raos
 * @emil 991207823@qq.com
 * @date 2021/5/16 20:48
 */
@Data
public class SysUser {

    private Long userId;

    /**
     * 账号
     */
    @NotBlank(message = "用户名不能为空")
    @Size(min = 6, message = "用户名长度不能小于6个字符")
    private String username;

    /**
     * 密码
     */
    @NotEmpty(message = "密码不能为空")
    @Size(min = 8, message = "密码长度不能小于8个字符")
    private String password;

    /**
     * 手机号
     */
    @NotBlank(message = "手机号不能为空")
    @Size(min = 11, max = 11, message = "手机号长度不对")
    private String mobile;

}
